In assembling a camera module of an electronic device such as a mobile phone, an adhesive is dispensed on a lens holder of the camera module and a filter is attached to the lens holder. The lens holder is assembled on a circuit board and then baked. Finally, a lens is assembled to the lens holder. In the camera module, a closed receiving chamber is formed by the lens holder, the circuit board, and the filter, therefore, a vent hole is needed to exhaust gas pressure in the receiving chamber. However, the vent hole can be easily blocked by the adhesive, thus the gas may expand during baking and deform the lens holder.